<html>
<head>
<meta http-equiv=Content-Type content=text/html;charset=utf-8>
<#include "../inc/commonJs.html">
<script language="JavaScript">
	function saveProject(id,obj){
		var url = "";
		if(id){
			url = '${request.contextPath}/xadmin/work/editTask.do?taskid='+id;
		}else{
			url = '${request.contextPath}/xadmin/work/addTask.do';
		}
		$('form').form('submit',{  
		    url:url,
		    onSubmit:function(param){
		    	param.visitor = $('#visitor').combobox('getText');
				return $(this).form('validate')
		    },  
		    success:function(data){ 
				window.top.gridObj.datagrid('reload');
				window.top.$.messager.alert('提示',data);
				window.top.windowObj.dialog('close');
		    }  
		});
	}
	function closeWin(){
		window.top.windowObj.dialog('close');
	}
	$(function(){
		$('#projectid').combotree('setValue','${obj.projectid!}');
		$('#worker').combobox('setValue', '${obj.worker!}');
		$('#visitor').combobox('setText', '${obj.visitor!}');
	})
</script>

</head>
<body>
<form method="post" name="flmxForm" id="flmxForm">
	<table align=center border="1" width="600" cellspacing="0" cellpadding="0" style=" margin-top:10px; border-collapse: collapse; border:#ccc 1px solid;">
      <tr>
        <td height="35" align="right"><div align="center">所属项目：</div></td>
        <td height="35">&nbsp;
        	<input id="projectid" class="easyui-combotree" name="projectid" style="width:200px;" data-options="panelHeight:110,url:'listProjectForTree.do'" />
         </td>
      </tr>
      <tr>
        <td width="30%" height="35" align="right" valign="middle"><div align="center"><span class="smallFont">任务名称：<font color=red>*</font></span></div></td>
        <td width="70%" height="35"><div align="left">&nbsp;
        <input class="easyui-validatebox" type="text" required="true" id="name" name="name" maxlength="30" style="width:200px;" value="${obj.name!}">
          </div></td>
      </tr>
      <tr>
        <td width="30%" height="35" align="right" valign="middle"><div align="center"><span class="smallFont">主执行人：<font color=red>*</font></span></div></td>
        <td width="70%" height="35"><div align="left">&nbsp;
        <input id="worker" class="easyui-combobox" name="worker"  style="width:200px;" panelHeight:"auto" data-options="panelHeight:110,valueField:'userid',textField:'username',url:'${request.contextPath}/xadmin/system/listUserForCombox.do'" />
          </div></td>
      </tr>
      <tr>
        <td width="30%" height="35" align="right" valign="middle"><div align="center"><span class="smallFont">参与执行人：<font color=red>*</font></span></div></td>
        <td width="70%" height="35"><div align="left">&nbsp;
        <input id="visitor" class="easyui-combobox"  style="width:200px;" panelHeight:"auto" data-options="panelHeight:130,multiple:true,valueField:'userid',textField:'username',url:'${request.contextPath}/xadmin/system/listUserForCombox.do'" />
          </div></td>
      </tr>
      <tr>
        <td width="30%" height="35" align="right" valign="middle"><div align="center"><span class="smallFont">说明：<font color=red>*</font></span></div></td>
        <td width="70%" height="35"><div align="left">&nbsp;
        <textarea rows="8" id="demo" name="demo" style="width:200px;">${obj.demo!}</textarea>
          </div></td>
      </tr>
  </table>
</form>
</body>
</html>